/*
 * MainApplication.h
 *
 *  Created on: Apr 4, 2017
 *      Author: zhangjf
 */

#ifndef INCLUDE_MAINAPPLICATION_H_
#define INCLUDE_MAINAPPLICATION_H_

#include <string>
#include <Poco/Logger.h>
#include <Poco/Util/ServerApplication.h>

using namespace std;
using namespace Poco;
using namespace Poco::Util;

extern  Logger *pLogger;

class MainApplication : public ServerApplication
{
public:
	MainApplication() {}
	virtual ~MainApplication() {}

	int main(const std::vector<std::string>& args);

protected:
	void initialize(Application& self);
	void uninitialize();

private:
	void initLogger(const string& strLogName);

	void defineOptions(OptionSet& options);
	void handleHelp(const std::string& name, const std::string& value);

};

#endif /* INCLUDE_MAINAPPLICATION_H_ */
